<?php 


/** 
***************************************************
*欢迎使用免费版xSite企业自助建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.php.net.cn/xsite/ 
***************************************************
**/



  header("Content-type: text/html;charset=utf-8"); require_once "m.inc.php"; parse_str(strip_tags($_GET['u']), $data); if (!array_key_exists('category', $data)) { exit('2.Error!'); } if (!array_key_exists($data['category'], $system_category)) { exit('3.Error!'); } $category = $data['category']; if (in_array($system_category[$category]['module'], array('article', 'product') )) { $key = intval($data['key']); } if ($system_category[$category]['module'] == 'article') { $info = tpl_article_details("category={$category}&key={$key}") ; if ($info == false) { exit('1.Error!'); } $item['title'] = $info['body_name']; } elseif ($system_category[$category]['module'] == 'product') { $info = tpl_product_details("category={$category}&key={$key}") ; if ($info == false) { exit('6.Error!'); } $item['title'] = $info['name']; $temp = ''; if(isset($info['product_pic']) && is_array($info['product_pic']) && count($info['product_pic'])) { foreach($info['product_pic'] as $k => $v){ if (!empty($v)) { $temp .= '<p><img src="' . SITE_PATH . '/' . $v . '"></p>'; } } if ($temp != '') { $info['content'] .= '<p class="header">本文相关附图：</p>' . $temp; } } } elseif ($system_category[$category]['module'] == 'page') { $key = @filectime(SITE_ROOT . "/data/setting/{$site_url}/{$category}/index.txt"); $info = tpl_page_details($category) ; $item['title'] = $info['body_name']; } else { exit('5.Error!'); } $info['content'] = strip_tags($info['content'], '<br><li><ul><div><span><p><b><strong><h1><h2><h3><h4><h5><img><a><table><tr><td><object><embed><param>'); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name=viewport content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title><?=$item['title']?></title>
<script>var ENV_MONITOR={},WPO={};WPO.data={dcl:[+(new Date)]}</script><script>var $pro='m_news',$pid='view';</script>
</head>
<body>
<style>
html,body,h1,h2,h3,h4,h5,h6,p,em,img,strong,b,i{border:none;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:baseline}body{background:#fff;color:#333;font-family:'Microsoft YaHei',Hei,arial,sans-serif;font-size:12px;text-align:center}a{color:#0063c8;text-decoration:none}aside{background:#F4F4F4;border-top:1px solid #EDEDED;font-size:16px;margin-top:12px;padding:0 12px;text-align:left;line-height:32px}aside em{color:#DA142B}.header{font-size:20px;font-weight:700}.img-title,#source-url{text-align:center}#news{padding:2em}#news-title{font-size:2em;line-height:1.25;word-wrap:break-word}#source-and-time{color:#ccc;font-size:125%;line-height:1.5;margin-top:0.3em}#time{margin-left:1em}#news-body{font-size:160%;line-height:1.55;text-align:left}#source-url{background:#f6f6f6;border-radius:3px;color:#999;display:block;font-size:200%;height:2em;line-height:2;text-decoration:none}#app-download{display:block;font-size:160%;height:2em;line-height:2;margin-top:1em}#news header{border-bottom:1px solid #ccc;padding-bottom:1.5em;text-align:left}#news-body p{margin:0.8em 0;text-indent:2em}#news-body img{max-width:100%}
</style>
<article id=news>
  <header>
    <h1 id="news-title"><?=$item['title']?> </h1>
    <p id="source-and-time"><span id=source>xSite</span>
      <time id=time><?=date("Y-m-d H:i:s", $key)?></time>
    </p>
  </header>
  <div id="news-body">
  <?php if(!empty($info['ptitle'])) {?>
    <p><img src="<?=SITE_PATH . '/' . $info['ptitle']?>"></p>
  <?php }?>
    <?=$info['content']?>
  </div>
  <footer> <a id="source-url" href="http://<?=("{$site_url}{$site_path}")?>">点击查看PC版</a> 
  			<a id="app-download" href="./download.php?src=dimecode">本站客户端下载</a> 
  </footer>
</article>

<script>
    var newsBody = document.getElementById("news-body"),
    imgs = newsBody.getElementsByTagName("img");
    for (var i = 0; i < imgs.length; i++) imgs[i].parentNode.tagName.toUpperCase() === "P" && (imgs[i].parentNode.style.textAlign = "center", imgs[i].parentNode.style.textIndent = "0")
</script>
<script>
    WPO.data.dcl.push( + (new Date))
</script>

<script src="skin/so_Zepto.js">
</script>
<script src="skin/4f1853e5.js">
</script>
<script>
    (function() {
        var e = function(e) {
            var t = e.split(","),
            n = "",
            r = [];
            for (var i = 0,
            s = t.length; i < s; i++) i > 0 && (n += "|"),
            n += "[?&](" + encodeURIComponent(t[i]) + "=[^&]*)";
            return location.search.replace(new RegExp(n, "g"),
            function(e) {
                var t = e.substr(1).split("=");
                r[t[0]] = decodeURIComponent(t[1])
            }),
            r
        },
        t = function(e, t) {
            var n = {
                get: function(e) {
                    var t, n = new RegExp("(^| )" + e + "=([^;]*)(;|$)");
                    return (t = document.cookie.match(n)) ? unescape(t[2]) : ""
                },
                set: function(e, t, n) {
                    n = n || {};
                    var r = n.expires;
                    typeof r == "number" && (r = new Date, r.setTime(r.getTime() + n.expires)),
                    document.cookie = e + "=" + escape(t) + (r ? ";expires=" + r.toGMTString() : "") + (n.path ? ";path=" + n.path: "") + (n.domain ? "; domain=" + n.domain: "")
                }
            };
            monitor.util.getSid = function() {
                var e = "___sid",
                t = n.get(e);
                return t || (t = monitor.util.getGuid() + "." + +(new Date), n.set(e, t)),
                t
            },
            monitor.data.getBase = function() {
                var n = {
                    pro: e,
                    pid: t,
                    u: monitor.util.getLocation(),
                    guid: monitor.util.getGuid(),
                    sid: monitor.util.getSid()
                };
                if (typeof window.ENV_MONITOR == "object") {
                    var r = window.ENV_MONITOR;
                    for (var i in r) n[i] = r[i]
                }
                return n
            },
            //monitor.setConf("srpUrl", "http://s.360.cn/so/srp.gif").setConf("dispUrl", "http://s.360.cn/so/disp.gif").setConf("clickUrl", "http://s.360.cn/so/click.gif")
        };
        t($pro, $pid),
        $(".search-box").delegate(".suggest-item-title", "mousedown",
        function(e) {
            var t = {
                mod: "suggest",
                input: $(".q").val(),
                click: parseInt($(this.parentNode).attr("data-index"), 10) + 1
            };
            monitor.log(t, "click")
        }),
        $(".search-box").delegate(".suggest-item-add", "mousedown",
        function(e) {
            var t = {
                mod: "suggest_add",
                input: $(".q").val(),
                click: parseInt($(this.parentNode).attr("data-index"), 10) + 1
            };
            monitor.log(t, "click")
        });
        var n = e("q,src");
        n.fe = WPO.data.dcl[1] - WPO.data.dcl[0],
        monitor.log(n, "srp"),
        document.getElementById("source-url").addEventListener("mousedown",
        function(t) {
            var n = e("q");
            n.mod = "source",
            n.value = this.href,
            monitor.log(n, "click")
        },
        !1),
        $("#next-news a").bind("mousedown",
        function(t) {
            var n = e("q");
            n.mod = "other",
            n.word = $(this).text(),
            n.pos = $(this).attr("data-pos"),
            monitor.log(n, "click")
        })
    })()
</script>

</body>
</html>
